<div class='resource-details'>
  <div class="row">
    <div class="col-lg-6">
      <h3>{{'Status' | translate}}</h3>
      <dl class="dl-horizontal left">
        <dt>{{'Status' | translate}}:</dt>
        <dd>
          <status-icon status="build.status.phase"></status-icon>
          {{build.status.phase}}
        </dd>
        <dt>{{'Started' | translate}}:</dt>
        <dd>
          <span ng-if="build.status.startTimestamp">
            <relative-timestamp timestamp="build.status.startTimestamp"></relative-timestamp>
            <span>- {{build.status.startTimestamp | date : 'short'}}</span>
          </span>
          <span ng-if="!build.status.startTimestamp"><em>{{'notstarted' | translate}}</em></span>
        </dd>
        <dt>{{'Duration' | translate}}:</dt>
        <dd>
          <span ng-switch="build.status.phase" class="hide-ng-leave">
            <span ng-switch-when="Complete">{{(build.status.startTimestamp || build.metadata.creationTimestamp) | duration : build.status.completionTimestamp}}</span>
            <span ng-switch-when="Failed">{{build.status.startTimestamp | duration : build.status.completionTimestamp}}</span>
            <span ng-switch-when="Running">running for <duration-until-now timestamp="build.status.startTimestamp"></duration-until-now></span>
            <span ng-switch-when="New">waiting for <duration-until-now timestamp="build.metadata.creationTimestamp"></duration-until-now></span>
            <span ng-switch-when="Pending">waiting for <duration-until-now timestamp="build.metadata.creationTimestamp"></duration-until-now></span>
            <span ng-switch-default>
              <span ng-if="build.status.startTimestamp">{{build.status.startTimestamp | duration : build.status.completionTimestamp}}</span>
              <span ng-if="!build.status.startTimestamp">waited for {{build.metadata.creationTimestamp | duration : build.status.completionTimestamp}}</span>
            </span>
          </span>
        </dd>
      </dl>
      <h3>{{'Configuration' | translate}} <span class="small" ng-if="buildConfigName">created from <a href="{{buildConfigName | navigateResourceURL : 'BuildConfig' : build.metadata.namespace}}">{{buildConfigName}}</a></span></h3>
      <dl class="dl-horizontal left">
        <dt>{{'Buildstrategy' | translate}}:</dt>
        <dd>{{build.spec.strategy.type}}</dd>
        <dt>{{'Builderimage' | translate}}:</dt>
        <dd class="truncate">{{(build | buildStrategy).from | imageObjectRef : build.metadata.namespace}}<span ng-if="!(build | buildStrategy).from"><em>{{'none' | translate}}</em></span></dd>
        <dt>{{'Sourcetype' | translate}}:</dt>
        <dd>{{build.spec.source.type}}</dd>
        <dt ng-if-start="build.spec.source.git.uri">{{'Sourcerepo' | translate}}:</dt>
        <dd ng-if-end><span ng-bind-html='build.spec.source.git.uri | githubLink : build.spec.source.git.ref : build.spec.source.contextDir | linky'></span></dd>
        <dt ng-if-start="build.spec.source.git.ref">{{'Sourceref' | translate}}:</dt>
        <dd ng-if-end>{{build.spec.source.git.ref}}</dd>
        <dt ng-if-start="build.spec.source.contextDir">{{'Sourcecontextdir' | translate}}:</dt>
        <dd ng-if-end>{{build.spec.source.contextDir}}</dd>
        <dt ng-if-start="build.spec.output.to">{{'Outputimage' | translate}}:</dt>
        <dd ng-if-end>{{build.spec.output.to | imageObjectRef : build.metadata.namespace}}</dd>
        <dt ng-if-start="build.spec.output.pushSecret.name">{{'Pushsecret' | translate}}:</dt>
        <dd ng-if-end>{{build.spec.output.pushSecret.name}}</dd>
      </dl>
    </div>
  </div>
  <annotations annotations="build.metadata.annotations"></annotations>
</div>
